package com.wowjoy.dp.sds.repoistory;

import com.wowjoy.dp.sds.domain.Dictionary;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DictionaryRepository extends MongoRepository<Dictionary, String> {
    List<Dictionary> findAllByParentId(String parentId);

    Dictionary getByCodeAndContext(String code, String context);

    List<Dictionary> findAllByParentIdIsNull();
}
